<div class="container-fluid" id="codeGridView">
    <div class="row ikg-row">
        <div class="col-lg-3 ikg-col">
            <div class="panel panel-default ikg-panel ikg-page-panel-no-search">
                <div class="panel-heading">
                    <h3 class="panel-title ikg-panel-title">
                        <i class="fa fa-code" aria-hidden="true"></i>&nbsp;&nbsp;公共码表树
                    </h3>
                </div>
                <div class="panel-body">
                    <div data-bind="jsTreeView:treeViewModel">
                        <i class="fa fa-spinner" aria-hidden="true">&nbsp;&nbsp;Loading...</i>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-lg-9 ikg-col">
            <div class="row ikg-row">
                <div class="col-sm-12 ikg-col">
                    <div id="toolbar" class="btn-group">
                        <button type="button" class="btn btn-sm btn-success" data-bind="click:fnAdd">
                            <i class="fa fa-plus fa-lg" aria-hidden="true"></i>&nbsp;&nbsp;新增
                        </button>
                        <button type="button" class="btn btn-sm btn-success"
                                style="font-size: 12px" data-bind="click:fnRemove">
                            <i class="fa fa-times fa-lg" aria-hidden="true"></i>&nbsp;&nbsp;删除
                        </button>
                    </div>
                </div>
            </div>
            <div class="row ikg-row">
                <div class="col-sm-12 ikg-col">
                    <table id="codeTableView" data-bind="tableView:tableViewModel"></table>
                </div>
            </div>
        </div>
    </div>
</div>
<div id="codeDialog" class="modal hide" tabindex="-1" role="dialog"
     data-bind="template:{name:'codeDetailTemplate',data:codeViewModel},ikgModal:{ backdrop: 'static', keyboard: false, show: modalVisible }"></div>

<script type="text/html" id="codeDetailTemplate">
    <div class="modal-dialog" style="width: 500px" role="document">
        <div class="modal-content">
            <!-- header -->
            <div class="modal-header ikg-modal-header" id="modalHeader">
                <button type="button" class="close ikg-close" data-bind="click: close">&times;</button>
                <span class="modal-title ikg-modal-title" data-bind="text:title"></span>
            </div>
            <div class="modal-body">
                <form class="form-horizontal" id="detailForm" autocomplete="off">
                    <div class="form-group">
                        <label for="codeValue" class="col-sm-3 control-label">码值</label>
                        <div class="col-sm-8">
                            <input type="text" class="form-control" name="codeValue"
                                   id="codeValue" placeholder="*,必填"
                                   data-bind="value:codeValue">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="codeText" class="col-sm-3 control-label">中文释义</label>
                        <div class="col-sm-8">
                            <input type="text" class="form-control" name="codeText"
                                   id="codeText" placeholder="*,必填" data-bind="value:codeText">
                        </div>
                    </div>
                    <!-- 默认基本信息 -->
                    <div style="display: none">
                        <input type="text" data-bind="value:codeId">
                        <input type="text" data-bind="value:editStatus">
                        <input type="text" data-bind="value:pCodeId">
                    </div>
                </form>
            </div>
            <div class="modal-footer" id="modalFooter">
                <button type="button" class="btn btn-success ikg-btn-12" data-bind="click:save,visible:enabled">
                    <i class="fa fa-save"></i> 保存
                </button>
                <button type="button" class="btn btn-default ikg-btn-12" data-bind="click:close">
                    <i class="fa fa-close"></i> 关闭
                </button>
            </div>
        </div>
    </div>
</script>